<template>
  <div class="router-content">
    <inside v-for="(div, index) in article" :key="index" :title="div.title" :contents="div.contents" :urls="div.urls"></inside>
  </div>
</template>

<script>
import Bus from '@/assets/bus'
import inside from '@/components/inside'
export default {
  name: 'index',
  components: {
    inside
  },
  data () {
    return {
      menus: [],
      article: []
    }
  },
  created () {
    this.menus = this.$route.matched
    Bus.$emit('menus', this.menus)
    // console.log(this.$route.matched)
    this.write()
  },
  methods: {
    write () {
      this.article = [
        {
          title: '送餐地址',
          contents: [
            '进入送餐地址页面，点击右上角新建送餐地址，如下图所示，弹出',
            '编辑送餐地址对话框，填写送餐地址，点击提交，即可添加送餐地址成功。'
          ],
          urls: [
            '/static/imgs/base/address_1.png',
            '/static/imgs/base/address_2.png'
          ]
        }, {
          title: '编辑送餐地址',
          contents: [
            '点击已建送餐地址旁边的编辑，如下图所示，可以重新编辑送餐地址。'
          ],
          urls: [
            '/static/imgs/base/address_3.png'
          ]
        }, {
          title: '删除送餐地址',
          contents: [
            '点击已建送餐旁边的删除，如下图所示，可以删除已建送餐地址。'
          ],
          urls: [
            '/static/imgs/base/address_4.png'
          ]
        }
      ]
    }
  }
}
</script>
<style>
</style>
